<gm:page title="Sample - gm:sort/header" authenticate="false">
  <table width="100%">
    <tr>
      <td width="50%" align="center">
        <h1>Unsorted</h1>
        A standard, unsorted list.
        <p></p>
        <gm:list data="http://digg.com/rss/index.xml" template="unsortedTemplate" />
      </td>
      <td width="50%" align="center">
        <h1>Sorted</h1>
        Sorted! Click column headers to change sort order.
        <p></p>
        <gm:list data="http://digg.com/rss/index.xml" sort="diggCountSort" template="sortedTemplate">
          <gm:sort name="diggCountSort" ref="digg:diggCount" type="number" reverse="true" />
          <gm:sort name="titleSort" ref="atom:title" />
        </gm:list>
      </td>
    </tr>
  </table>
  <gm:template id="unsortedTemplate">
    <table>
      <thead>
        <tr>
          <th>Diggs</th>
          <th />
          <th>Headline</th>
        </tr>
      </thead>
      <tr repeat="true">
        <td><gm:number ref="digg:diggCount" /></td>
        <td width="15" />
        <td><gm:text ref="atom:title" /></td>
      </tr>
    </table>
  </gm:template>

  <gm:template id="sortedTemplate">
    <table>
      <thead>
        <tr>
          <th><gm:header sort="diggCountSort">Diggs</gm:header></th>
          <th />
          <th><gm:header sort="titleSort">Headline</gm:header></th>
        </tr>
      </thead>
      <tr repeat="true">
        <td><gm:number ref="digg:diggCount" /></td>
        <td width="15" />
        <td><gm:text ref="atom:title" /></td>
      </tr>
    </table>
  </gm:template>

</gm:page>